package com.evenmo.controller;

import com.evenmo.pojo.Student;
import com.evenmo.service.StudentService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * This is Description
 *
 * @author moyongjun
 * @date 2019/12/06
 */
@Controller
@RequestMapping(value = "/student")
public class StudentController {
    @Resource
    private StudentService studentService;

    @RequestMapping(value = "/stuid",method = RequestMethod.GET)
    @ResponseBody
    public Student getStudentById(Integer id){

        Student student = studentService.queryHaveClazzById(id);
        return student;
    }
}
